package org.shiwen.week5.Friday;

public class IsPrime {
    static boolean isPrime(int number) {
        if (number <= 1) {
            return false;
        } else if (number == 2) {
            return  true;
        }
        for (int i = 2; i < number; i++) {
            if (number % i == 0) {
                return false;
            } else if (i>=Math.sqrt(number)) {
                return true;
            }
        }
        return false;
    }
}
